package main

import (
	"github.com/google/uuid"
	"github.com/valyala/fasthttp"
	"go.uber.org/zap"
)

var logger *zap.Logger

func init() { logger, _ = zap.NewProduction() }
func fastHTTPHandler(ctx *fasthttp.RequestCtx) {
	uId := uuid.NewString()
	ctx.SetBodyString(uId)
	logger.Info("hello, go module", zap.ByteString("uri", ctx.RequestURI()))
}
func main() {
	err := fasthttp.ListenAndServe(":8081", fastHTTPHandler)
	if err != nil {
		logger.Error("failed to start server", zap.Error(err))
		return
	}
}
